IF NOT EXISTS (SELECT 1 FROM sys.objects
					 WHERE type ='u' AND object_id = OBJECT_ID('MD3.PrimaryKeys'))
BEGIN
	
	CREATE TABLE MD3.PrimaryKeys
	   (Id              BIGINT IDENTITY(1,1) NOT NULL,
	SchemaName VARCHAR(256) NOT NULL,
	TableName VARCHAR(256) NOT NULL,
	PrimaryKeyName	SYSNAME NOT NULL,    
	KeyColumns VARCHAR(MAX) NOT NULL,
    IsClustered	BIT NOT NULL,  
	IdxFillFactor int NOT NULL,
	IsPadded BIT NOT NULL,
    FGorPartitionScheme VARCHAR(MAX) NOT NULL,
	CompressionSetting varchar(255) NOT NULL,
	DropPK BIT NOT NULL
	);
	   
	ALTER TABLE MD3.PrimaryKeys ADD CONSTRAINT PrimaryKeysPK 
	PRIMARY KEY CLUSTERED (Id);
		
END 
--drop table MD3.PrimaryKeys
